package com.zhang.client;

import com.zhang.entity.CartInfo;
import com.zhang.entity.PaymentInfo;
import com.zhang.result.RetVal;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.List;


//该远程接口是由哪个微服务去实现
@FeignClient(value = "shop-payment")
public interface PaymentFeignClient {

    //3.退款接口
    @GetMapping("/payment/refund/{orderId}")
    public boolean refund(@PathVariable Long orderId);

    //4.查询支付宝中是否有交易记录
    @GetMapping("/payment/queryAlipayTrade/{orderId}")
    public boolean queryAlipayTrade(@PathVariable Long orderId);

    //3.交易关闭
    @GetMapping("/payment/closeAlipayTrade/{orderId}")
    public boolean closeAlipayTrade(@PathVariable Long orderId);

    //6.根据outTradeNo查询支付单表信息
    @GetMapping("/payment/getPaymentInfo/{outTradeNo}")
    public PaymentInfo getPaymentInfo(@PathVariable String outTradeNo);
}
